home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 24
/
Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso
/
Aminet
/
dev
/
e
/
AEPD09.lha
/
EPD09
/
Amiga_E-Programme
/
ESEE
/
GoldED
/
Parsers
/
OBJECT.devpac
< prev
next >
Wrap
Text File
|
1994-08-18
|
2KB
|
75 lines
*
* OBJECT.devpac - by Leon Woestenberg 1993, fully public domain.
* ~~~~~~~~~~~~~
* Description
* ~~~~~~~~~~~
* ESEE 'OBJECT' Section Parser in assembly language.
*
* Function
* ~~~~~~~~
* Can be called by GoldED to parse one line for OBJECT indexing.
*
* Input (comes from GoldED)
* ~~~~~
* a0 - address of stringpointer to line
* d0 - length of the line
*
* Output (goes to GoldED)
* ~~~~~~
* a0 - address of stringpointer to objectname
* d0 - length of functionname
*
* GoldED Settings
* ~~~~~~~~~~~~~~~
* It's advicable to set the file extension to '*.e' for this parser. This
* can be done in GoldED's Sections window called by GoldED's FUNC command.
*
move.l a1,-(a7) * store a1
move.l (a0),a1 * stringpointer to a1
cmp.b #40,(a1) * char (?
bne not
cmp.b #45,1(a1) * char -?
bne not
cmp.b #45,2(a1) * char -?
bne not
cmp.b #45,3(a1) * char -?
bne not
cmp.b #41,4(a1) * char )?
bne not
cmp.b #32,5(a1) * space?
bne not
cmp.b #79,6(a1) * char O?
bne not
cmp.b #66,7(a1) * char B?
bne not
cmp.b #74,8(a1) * char J?
bne not
cmp.b #69,9(a1) * char E?
bne not
cmp.b #67,10(a1) * char C?
bne not
cmp.b #84,11(a1) * char T?
bne not
cmp.b #32,12(a1) * space?
bne not
add.l #13,a1 * stringpointer to functionname
add.l #13,(a0) * idem dito
sub.l #13,d0 * substract OBJECT header length
move.l d0,d1 * copy string length to d1
clr.l d0 * initialize d0 for search
find:
cmp.b #32,(a1) * space? (to skip remarks)
beq end
add.l #1,a1 * increase charpointer
add.l #1,d0 * increase length
cmp.b d0,d1 * eol?
beq end
jmp find * check next char
not:
clr.l d0 * no success, return zero
end:
move.l (a7)+,a1 * restore a1
rts * bye bye